<?php

namespace App\Http\Controllers;

use App\Models\Works;

class WebController extends Controller
{
    //

    public function index()
    {
        $worksSn = request('worksSn');
        $works = Works::where('user_sn', $worksSn)->first();

        $works->support_count = $works->support_count + 100;

        // 存储mysql数据
        $res = $works->save();
        $works = Works::where('user_sn', '390')->first();
        dd($works);
    }
}
